package study.dubbo.springcloud.provider.service;

import cn.hutool.core.thread.ThreadUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Component;
import study.dubbo.api.service.TimeoutService;

import java.util.concurrent.TimeUnit;

@Slf4j
@Component
@DubboService
public class TimeoutServiceImpl implements TimeoutService {

    @Override
    public void timeout(long timeout) {
        log.info("123123");
        ThreadUtil.sleep(timeout, TimeUnit.SECONDS);
        log.info("abbbbb");
    }
}
